<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ page import="com.point.business.database.model.*"%>
<%@ taglib prefix="secND" uri="/WEB-INF/canSearchND.tld"%>
<%@ taglib prefix="secNO" uri="/WEB-INF/canSearchNO.tld"%>
<%@ taglib prefix="secSL" uri="/WEB-INF/canSearchSL.tld"%>
<%@ taglib prefix="secUOPB" uri="/WEB-INF/canSearchUOPB.tld"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Biznis.Point</title>
<link rel="icon" type="img/ico" href="images/icons/favicon.ico">
<jsp:include page="../loadResources.jsp" />
</head>
<script>
var contextPath = '<%=request.getContextPath()%>';
	$(document).ready(function() {
		$('#typeND').combobox({
			url : contextPath + '/servlet/AllNDTypesServlet',
			panelHeight : 'auto',
			valueField : 'value',
			textField : 'value',
			onSelect : function(record) {
				$(this).parent().find('input[type=hidden]').val(record.value);
			}
		});
	});
	$(document).keypress(function(event) {

		var keycode = (event.keyCode ? event.keyCode : event.which);
		if (keycode == '13') {
			$('#searchBtnND').click();
		}

	});
	$(document).keypress(function(e) {
		if (e.keyCode == 27) {
			$('#dlgNDSearchDetails').dialog('close');
			$('#dlgNothingFound').dialog('close');
		}
	});
	var showRecomendation = function(){
		$('#documentNumberTooltip').show();
		$(".tolltip-triangle").show();
	};
	var hideRecomendation = function(){
		$('#documentNumberTooltip').hide();
		$(".tolltip-triangle").hide();
	};
</script>
<body id="page1">
	<div class="bg">
		<div class="main">
			<header> <jsp:include page="../header.jsp" />
			<div class="row-2-1">
				<nav>
				<ul class="tabMenu">
					<secNO:canSearchNO>
						<li><a href="user.jsp">Нотарски објави</a></li>
					</secNO:canSearchNO>
					<secSL:canSearchSL>
						<li><a href="bankruptcy.jsp">Регистар на правни лица</a></li>
					</secSL:canSearchSL>
					<li><a class="active" href="personalDocs.jsp">Лични
							документи</a></li>
					<secUOPB:canSearchUOPB>
						<li><a href="searchUOPB.jsp">УОПБ</a></li>
					</secUOPB:canSearchUOPB>
					<!-- <li><a href="products.html">Our Products</a></li>
						<li class="last-item"><a href="contacts.html">Contact Us</a></li> -->
				</ul>
				</nav>
			</div>
			</header>
			<section id="content">
			<div class="padding">
				<div class="box-bg">
					<div class="wrapper">
						<h3>Лични Документи</h3>
						<form id="searchND" method="post" class="margin-top-20">
							<div class="pull-left margin-bottom-15 full-width" style="position: relative;">
								<span style="width: 22%;"
									class="font-size-12 pull-left color-4 input-label">Внесете
									број на документот:</span>
								<div class="search-form pull-left" >
									<input type="text" 
										id="documentNumber" onfocus="showRecomendation()" onblur="hideRecomendation()"
										class="search-input-padding login-input search-form"
										name="documentNumber">
										<div class="tolltip-triangle"></div>
									<div class="tooltip-wrapper" id="documentNumberTooltip">
										<span style="color: #FF0000;" >ВАЖНО: За да добиете точни резултати, надобро внесете го само бројот на документот. 
										Буквата пред бројот може да биде внесена како Кирилична или Латинична и притоа да не добиете точен податок од пребарувањето.</span>
									</div>
								</div>
							</div>
							<br>
							<div class="pull-left margin-bottom-15 full-width">
								<span style="width: 22%;"
									class="font-size-12 pull-left color-4 input-label">Внесете
									тип на документот:</span>
								<div class="pull-left">
									<input id="type" type="hidden" name="type"> <select
										id="typeND" class="easyui-combobox" name="state"
										style="width: 200px;">
									</select>
								</div>
							</div>
							<br>
							<div class="pull-left margin-bottom-15 full-width">
								<span style="width: 22%;"
									class="font-size-12 pull-left color-4 input-label">Внесете
									име:</span>
								<div class="search-form pull-left">
									<input type="text" id="fullName" onkeyup="latcyr(this)"
										class="search-input-padding login-input search-form"
										name="fullName">
								</div>
							</div>
							<input type="hidden" name="userId" value="${user.id}" id="userId">
							<div class="clear margin-bottom-15">
								<input style="float: left;" type="button"
									onclick="getAllActiveNotificationsSL('ND');"
									class="button-login" id="getAllAcitveNotificatins"
									value="Активни нотификации"><input style="float: left;"
									type="button" onclick="addToSchedule();"
									class="button-login" id="addNotification"
									value="Пријава за нотификации"> <input type="button"
									class="button-login" onclick="searchND()" id="searchBtnND"
									value="Пребарувај">
							</div>
						</form>
						
						<!-- <div class="clear margin-bottom-15">
								<input type="submit" onclick=""
									class="button-login" value="Пребарувај">
							</div> -->
					</div>
					<div class="wrapper">
						<span
							class="font-size-14 pull-left color-4 input-label hide bold-font"
							id="tooMuchResults"> Пронајдени се повеќе од <%=com.point.business.util.Settings
					.getValue("max.rows.per.search")%>
							резултати. Ви ги прикажуваме најновите <%=com.point.business.util.Settings
					.getValue("max.rows.per.search")%>.
						</span>
					</div>
					<div class="weapper search-list-wrapper" id="searchNDTableWrapper">
						<div class="pull-left">
							<table id="ndTabelGrid" class="easyui-datagrid"
								title="Лични документи" rownumbers="true"
								style="width: 994px; height: 400px;" nowrap="false"
								autoRowHeight="true" fitColumns="true" singleSelect="true">
								<thead>
									<tr>
										<th field="documentNumber" width="110">Број на документ</th>
										<th field="type" width="80">Тип</th>
										<th field="fullName" width="130">Име Презиме</th>
										<!-- <th field="address" width="120">Адреса</th> -->
										<th field="city" width="60">Град</th>
										<!-- <th field="authority" width="80">Орган</th>
										<th field="evidationNumber" width="80">Евидентен број</th>
										<th field="announcmentIssueDate" width="100">Дата на Службен весник на РМ</th>
										<th field="announcmentIssueNumber" width="100">Број на издание на Службен весник на РМ</th> -->
									</tr>
								</thead>
							</table>
							<div id="dlgNDSearchDetails" class="easyui-dialog" modal="true"
								style="width: 580px; height: 260px; padding: 20px 20px; font-size: 14px;"
								closed="true" buttons="#dlg-buttons">
								<div style="margin-top: 5px;">
									<span class="result-content-header">Ве известуваме</span><span>
										дека лицето </span><span class="ndfullName"></span> <span> со
										адреса на </span><span class="ndaddress"></span><span>, од </span> <span
										class="ndcity"></span><span>, објави </span> <span
										class="ndtype"></span><span> со број: </span><span
										class="nddocumentNumber"></span><span> за неважечки.</span><br>
								</div>
								<br> <span class="result-content-header">Објавата е
									извршена</span> <span> на ден:</span><span
									class="ndannouncmentIssueDate"></span><br> <span>Документот
									е објавен во Службен весник на РМ број: </span><span
									class="ndannouncmentIssueNumber"></span> <span>, од </span><span
									class="ndannouncmentIssueDate"></span><span> година.</span><br>
								<span>Превземи ја објавата од јавната страна на ЈП
									Службен весник на Република Македонија </span> <a
									id="downloadNDDocument" href="" target="_blank">овде</a>
							</div>
							<div id="dlg-buttons">
								<a href="#" class="easyui-linkbutton" iconCls="icon-cancel"
									onclick="javascript:$('#dlgNDSearchDetails').dialog('close')">Затвори</a>
							</div>
						</div>
					</div>
					<div id="dlgNothingFound" class="easyui-dialog" modal="true"
						style="width: 400px; height: 250px; padding: 10px 20px"
						closed="true" buttons="#dlg-buttonsNothingFound">
						<div id="nothingFound"></div>
						<div id="dlg-buttonsNothingFound">
							<a href="#" class="easyui-linkbutton" iconCls="icon-cancel"
								onclick="javascript:$('#dlgNothingFound').dialog('close')">Затвори</a>
						</div>
					</div>
					<div id="allActiveNotificatins" class="easyui-dialog" modal="true"
						style="width: 600px; height: 430px; padding: 10px 20px"
						closed="true" buttons="#dlg-buttonsAllActiveNotificaions">
						<table id="allActiveNotificatinsTabelGrid" class="easyui-datagrid" toolbar="#notificationToolbar"
							style="width: 550px; height: 330px" title="Активни нотификации"
							rownumbers="true" fitColumns="true" nowrap="false"
							autoRowHeight="true">
							<thead>
								<tr>
									<th field="ck" checkbox="true"></th>
									<th field="notification" width="100">Нотификација</th>
									<!-- <th field="id" width="100">ID</th> -->
									<th field="active" width="40">Статус</th>
									<th field="searchDate" width="40">Датум</th>
								</tr>
							</thead>
						</table>
						<div id="notificationToolbar">
							<a href="#"
								class="easyui-linkbutton" iconCls="icon-remove" plain="true"
								onclick="deleteNotification()">Избриши нотификација</a>
						</div>
						<div id="dlg-buttonsAllActiveNotificaions">

							<a href="#" class="easyui-linkbutton" iconCls="icon-cancel"
								onclick="javascript:$('#allActiveNotificatins').dialog('close')">Затвори</a>
						</div>
					</div>
					<div class="wrapper search-list-wrapper" id="searchNDresults">
						<ul>
						</ul>
					</div>
				</div>
			</div>
			</section>
			<footer> <jsp:include page="../footer.jsp" /> </footer>
		</div>
	</div>
</body>
</html>